#!/bin/bash
PID=$(ps -ef | grep kongbai-fast.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
    echo Application is already stopped
else
    mv ./nohup.out ./sotp_for_$(date -d yesterday +%Y-%m-%d_%H:%M:%S)nohup.out
    echo kill $PID
    kill $PID
fi
